package com.hinotoyk.testsystem.controller;

import com.hinotoyk.testsystem.entity.Student;
import com.hinotoyk.testsystem.service.TeacherService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @program: testsystem
 * @description:
 * @author: DYJ
 * @create: 2019-11-21 19:25
 **/

@Controller
public class TeacherController {

    @Resource
    private TeacherService teacherService;

    @RequestMapping("/teacher/getStudents")
    public String getStudentByTeachId(Model model,int teacherId){
        List<Student> list = teacherService.getStudentByTeachId(teacherId);
        model.addAttribute("studentList",list);
        return "/teacher/student/manageStudents";
    }

}
    